MoonSound MSX OPL4 cartridge

Almost one and a half years ago I was approached by the Swiss MSX 
Handlergemeinschaft. I was asked to write the software for a new sound chip 
that they wanted to use on the MSX. The idea was to make an MSX cartridge 
containing Yamaha's OPL3. The whole project took up so much time that in the 
mean time, Yamaha brought out the OPL4! After reading the OPL4's 
specifications I insisted the OPL4 was used, and luckily they agreed. The name 
of this new OPL4 cartridge is MoonSound.

Unfortuneatly, at the time of writing, I still haven't got an OPL4 evaluation 
board. I have, however, had an OPL3 evaluation board for more than six months. 
This means that everything in this article relating to the FM synthesizer has 
been tested, but everything relating to the PCM synthesizer came from Yamaha's 
manuals and hasn't been tested.

Firstly I'll sum up the chip's more important possibilities. I'll try not to 
be too techinical, but sometimes this can't be avoided. Some use of MSX-AUDIO 
(Music Module) and MoonBlaster will clarify much. The OPL4 consists of two 
main parts; an FM synthesizer unit (the OPL3) and a PCM Synthesizer Unit. The 
latter is better known in the PC world as Wave Table Synthesis.

FM:

-Maximum of eighteen two-operator FM channels or fifteen FM channels with five 
 drum sounds
-Maximum of six four-operator FM channels (with six two-operator channels as 
 well)
-Eight different waveforms
-Possibility to indicate per channel whether it is audible on the left, right 
 or both

PCM:

-Maximum of 24 waves simultaenously! (24 channels, in other words!)
-Playback frequency of 44.1 kHz
-8, 12 or 16 bit wave data
-Stereo signal in 16 settings for each channel

The FM synthesizers

To be able to judge the OPL4's FM synthesizer we should compare it with the 
MSX-MUSIC (FM-PAC) and the MSX-AUDIO (Music Module). Everyone will be know the 
possibilities of these two chips. The OPL4 mainly resembles the MSX-AUDIO. 
This is logical, because the MSX-AUDIO was really the OPL1. Regarding the FM 
synthesizer, the OPL4 is completely compatible with the MSX-AUDIO. But the 
OPL4 has twice as many channels!

Furthermore there are the so-called 4-operator instruments. Normally an 
instrument is made by setting two operators correctly. Think of MoonBlaster's 
Make Own Voice option. But now it is possible to create instruments with four 
operators. Of course, with a little effort, nicer instruments can be made than 
was previously possible. Another improvement is that the type of waveform can 
be set per operator. Without going into detail: the waveform on the MSX-AUDIO 
is always a sine wave, this can now vary.

The PCM synthesizers

This part of the OPL4 makes it possible to play samples. A sample is a piece 
of digitised sound. This ensures that the instrument is reproduced 
realistically, because it is an exact copy! A sample's disadvantage is that a 
large difference in recording and playback frequencies results in an ugly 
result: the instrument no longer resembles the orginal. To create, for 
instance, a nice piano one would have to digitise almost every one of the 
piano's keys. To avoid this the digitised sound is influenced by the PCM 
synthesizer.
A sample's quality is determined by two things: the sample resolution and the 
sample speed. It isn't possible to go into this in depth here, but with a 16 
bit sample resolution and a frequency of 44.1 kHz the OPL4 has CD quality 
sound!

The PCM synthesizer too has stereo capabilities. These are even better than 
the FM synthesizer's, because there are sixteen settings to determine at what 
volume sound is audible left or right. Not just a choice between left and 
right, but a real balance control! This can be set independantly for each of 
the 24 channels.

PCM data takes up a great deal of memory, even after the OPL4's synthesizer 
tricks. Especially on the MSX it is hard when a tune requires 300k of wave 
data to be loaded. The solution is a 2 MB ROM which will be contained in the 
cartridge. This is a ROM designed specially by Yamaha for the OPL4 which has 
all General Midi sounds! These are 128 instruments and 47 drum sounds. Another 
128k of RAM is added to enable the use of one's own samples. The real freaks 
have the option of replacing this 128k for 512k.

For clarity: the OPL4 cannot digitise sound, it can merely reproduce digitised 
sound. This is not really a problem because the wave data is only PCM data 
with some extra information. It should be easy to use samples made on a Music 
Module, Turbo R, or any other computer.

Speed

For programmers it may be of interest to know that the OPL4 is much faster 
than the MSX-MUSIC or MSX-AUDIO. When using the latter two, with the slow Z80, 
one sometimes had to wait for the chips. The OPL4 is so fast that even the 
R800 doesn't have to wait. Another handy feature is that all (!) registers can 
now be read.

For the relatively slow MSX computer it is a great advantage that the OPL4 
handles almost everything on its own. If this were not so, it would never be 
possible to play 24 waves at once. Think of Xelasoft's well programmed 
MODplayer. On a Turbo R it has trouble playing four samples simutaenoulsy. The 
OPL4 makes it possible to produce demos or games with incredible background 
music. In games, the 128k of RAM can optimally be used to use samples as sound 
effects. It should also be possible to make a MOD player that works on a Z80 
and has time left over!

The software

Two music programs will be bundled with the OPL4. The are both special 
versions of MoonBlaster. There is an FM version and a Wave version. The FM 
version has the possibility to use (a maximum of) eighteen FM channels in 
combination with six Wave channels for, for example, the drums. The Wave 
version will "only" support 24 Wave channels. This difference has been made to 
ensure the song data doesn't become too large and to allow the program to run 
on computers with 128k RAM.

As mentioned, both programmes will look like MoonBlaster and anyone who is 
used to using this will quickly get used to these programs. The main 
difference with MoonBlaster is that these programs run in DOS. If a 256k 
mapper is present DOS 2 (and therefore a harddisk) will be supported. In both 
programs it will be possible to load MoonBlaster v1.4 music.

As soon as I have finished programming these two programs, I'll start on a 
General MIDI file player and an Amiga MOD player. When these will be ready I 
don't know, but if everything is as simple as the Yamaha specifications then 
this shouldn't take too long.

Many groups have already announced they will support the OPL4, and demos and 
games supporting the OPL4 will be released at the Tilburg show.

MoonSound, (the MSX OPL4 cartridge) will probably be available by October or 
November, the price will be around NLG 350. 

Remco Schrijvers
Moonsoft/Sunrise Foundation
